<template>
  <div class="ECard">
    <div class="left">
      <el-card class="box-card">
        <div slot="header">
          <span style="font-size: 14px">{{ leftTitle }}</span>
        </div>
        <slot name="left"></slot>
      </el-card>
    </div>
    <div class="right">
      <el-card class="box-card">
        <div slot="header" class="clearfix">
          <span style="font-size: 14px">{{ rightTitle }}</span>
        </div>
        <slot name="right"></slot>
      </el-card>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ECard',
  props: {
    leftTitle: {
      type: String,
      default: '左侧标题'
    },
    rightTitle: {
      type: String,
      default: '右侧标题'
    }
  },
  computed: {},
  data () {
    return {}
  },
  methods: {
    selectChange (val) {
      this.$emit('selectValue', val)
    }
  }
}
</script>

<style lang="scss" scoped>
.ECard {
  display: flex;
  justify-content: space-around;

  .left {
    width: 70%;
    margin-right: 10px;
    height: calc(100vh - 180px);
    ::v-deep .el-card {
      height: 100%;
      .el-card__header {
        height: 66px;
        line-height: 34px;
      }
      .el-card__body {
        height: calc(100% - 66px);
      }
    }
  }
  .right {
    width: 28%;
    max-height: calc(100vh - 180px);
    ::v-deep .el-card {
      height: 100%;
      .el-card__header {
        height: 66px;
        line-height: 34px;
      }
      .el-card__body {
        height: calc(100% - 66px);
        overflow-x: auto;
      }
    }
  }
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: '';
}
.clearfix:after {
  clear: both;
}
</style>
